using System;
using System.Drawing;
using System.Runtime.Serialization;

namespace Motorway_Simulator.Components
{
    /// <summary>
    /// Sign road unit component
    /// </summary>
    [Serializable]
    public class Sign : GraphicComponent
    {
        /// <summary>
        /// Holds the sign speed limit
        /// </summary>
        private int speedLimit;

        /// <summary>
        /// Constructor to create a sign object with specified 
        /// </summary>
        /// <param name="speedLimit">Maximum Speed limit</param>
        public Sign(int speedLimit)
            : base()
        {
            // Default setting
            this.speedLimit = speedLimit;
        }

        /// <summary>
        /// Draws road unit image
        /// </summary>
        /// <param name="g">Graphics</param>
        public override void Draw(Graphics g)
        {
            throw new System.Exception("Not implemented");
        }

        /// <summary>
        /// Accessor method to set/get speed limit
        /// </summary>
        public int SpeedLimit
        {
            set { speedLimit = value; }
            get { return speedLimit; }
        }
    }
}